# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-yaml
_pkgname=PyYAML
pkgver=5.4.1.1
_pkgver=5.4.1
pkgrel=2
pkgdesc='YAML parser and emitter for Python.'
url='https://pypi.org/project/yaml/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2' 'libyaml')
makedepends=('python2-setuptools' 'cython2')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$_pkgver.tar.gz")
sha512sums=('359c45d843fd839797572efeab121f17b1947647960dfb062f3618f25f71e1a6bc4bab14a1720b6b67f256089d5d48c452ec5419e3130222765c7ca41db11dad')

build() {
  cd "$_pkgname-$_pkgver"

  python2 setup.py --with-libyaml build
}

package() {
  cd "$_pkgname-$_pkgver"

  python2 setup.py --with-libyaml install --root="$pkgdir" --prefix=/usr -O1 \
    --skip-build
}

